/*** Eclipse Class Decompiler plugin, copyright (c) 2012 Chao Chen (cnfree2000@hotmail.com) ***/
package com.qihoo.gamecenter.sdk.suspend.b.e;

import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;

public class i {
    public static String a(String paramString) {
        paramString = paramString.replaceAll(" ", "%20");
        StringBuffer localStringBuffer = new StringBuffer();
        for (int i = 0; i < paramString.length(); ++i) {
            char c = paramString.charAt(i);
            byte[] arrayOfByte = String.valueOf(c).getBytes();
            if ((arrayOfByte == null) || (arrayOfByte.length <= 0))
                throw new UnsupportedEncodingException();
            if (arrayOfByte.length == 1) {
                localStringBuffer.append(c);
            }
            else {
                String str = new String(arrayOfByte);
                str = URLEncoder.encode(str, "UTF-8");
                localStringBuffer.append(str);
            }
        }
        return localStringBuffer.toString();
    }
}